If you have a custom field that contains a year and would like to use it in special pricing, you can use the datepart function. In the following example, the field is Name_Custom.MEMBER_YEAR. It is a character field with a length of four. Add the field to the Name_All view, and you can use this calculation in special pricing:
If Name_All.MEMBER_YEAR >= datepart (year,Today(*))
Then 100
Else 200
Endif
The datepart function in this example takes the year from the current date, Today(*). The IF statement compares the current year to Name_All.MEMBER_YEAR, resulting in customers being charged 100 if the MEMBER_YEAR is greater than or equal to the current year, or 200 if the MEMBER_YEAR is less than the current year.
10.6 Production Release. Updated 7/20/2005 2:18:26 PM
Copyright © by Advanced Solutions International, Inc.
All rights reserved.